home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
VISUALBA
/
VB_SMPL.ZIP
/
FOCUSPRB.EXE
/
FORM1.FRM
< prev
next >
Wrap
Text File
|
1993-11-17
|
2KB
|
107 lines
VERSION 2.00
Begin Form Form1
Caption = "Form1"
ClientHeight = 5076
ClientLeft = 1428
ClientTop = 1728
ClientWidth = 6780
Height = 5544
Left = 1356
LinkTopic = "Form1"
ScaleHeight = 5076
ScaleWidth = 6780
Top = 1332
Width = 6924
Begin TextBox Text3
Height = 495
Left = 4200
TabIndex = 2
Text = "Text3"
Top = 1440
Width = 1215
End
Begin TextBox Text2
Height = 495
Left = 2760
TabIndex = 1
Text = "Text2"
Top = 960
Width = 1215
End
Begin TextBox Text1
Height = 495
Left = 1320
TabIndex = 0
Text = "Text1"
Top = 480
Width = 1215
End
End
Dim LastControl As Control
Dim CurrControl As Control
Sub CheckLostFocus ()
If (LastControl.Tag = "True") Then
X% = MsgBox("Is the value OK ?", 36, LastControl + " has Lost Focus")
If X% = 6 Then 'if YES
LastControl.Tag = ""
CurrControl.SetFocus
Else
LastControl.SetFocus
End If
End If
End Sub
Sub Form_Load ()
Set LastControl = Text1
End Sub
Sub Text1_Change ()
Text1.Tag = "True"
End Sub
Sub Text1_GotFocus ()
Set CurrControl = Text1
CheckLostFocus
End Sub
Sub Text1_KeyPress (KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
Text2.SetFocus
End If
End Sub
Sub Text1_LostFocus ()
Set LastControl = Text1
End Sub
Sub Text2_Change ()
Text2.Tag = "True"
End Sub
Sub Text2_GotFocus ()
Set CurrControl = Text2
CheckLostFocus
End Sub
Sub Text2_LostFocus ()
Set LastControl = Text2
End Sub
Sub Text3_Change ()
Text3.Tag = "True"
End Sub
Sub Text3_GotFocus ()
Set CurrControl = Text3
CheckLostFocus
End Sub
Sub Text3_LostFocus ()
Set LastControl = Text3
End Sub